home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SPINDIAL.PAK / SPINCTL.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  82 lines

  1. // spinctl.h : Declaration of the CSpindialCtrl OLE control class.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSpindialCtrl : See spinctl.cpp for implementation.
  16.  
  17. class CSpindialCtrl : public COleControl
  18. {
  19.     DECLARE_DYNCREATE(CSpindialCtrl)
  20.  
  21. // Constructor
  22. public:
  23.     CSpindialCtrl();
  24.  
  25. // Overrides
  26.  
  27.     // Drawing function
  28.     virtual void OnDraw(
  29.                 CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  30.  
  31.     // Persistence
  32.     virtual void DoPropExchange(CPropExchange* pPX);
  33.  
  34.     // Reset control state
  35.     virtual void OnResetState();
  36.  
  37. // Implementation
  38. protected:
  39.     ~CSpindialCtrl();
  40.  
  41.     DECLARE_OLECREATE_EX(CSpindialCtrl) // Class factory and guid
  42.     DECLARE_OLETYPELIB(CSpindialCtrl)       // GetTypeInfo
  43.     DECLARE_PROPPAGEIDS(CSpindialCtrl)      // Property page IDs
  44.     DECLARE_OLECTLTYPE(CSpindialCtrl)        // Type name and misc status
  45.  
  46. // Message maps
  47.     //{{AFX_MSG(CSpindialCtrl)
  48.             afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  49.         //}}AFX_MSG
  50.     DECLARE_MESSAGE_MAP()
  51.  
  52. // Dispatch maps
  53.     //{{AFX_DISPATCH(CSpindialCtrl)
  54.     afx_msg short GetNeedlePosition();
  55.     afx_msg void SetNeedlePosition(short nNewValue);
  56.     //}}AFX_DISPATCH
  57.     DECLARE_DISPATCH_MAP()
  58.  
  59.     afx_msg void AboutBox();
  60.  
  61. // Event maps
  62.     //{{AFX_EVENT(CSpindialCtrl)
  63.     void FireSpinPositive()
  64.         {FireEvent(eventidSpinPositive,EVENT_PARAM(VTS_NONE));}
  65.     //}}AFX_EVENT
  66.     DECLARE_EVENT_MAP()
  67.  
  68. // Dispatch and event IDs
  69. public:
  70.     enum {
  71.     //{{AFX_DISP_ID(CSpindialCtrl)
  72.     dispidNeedlePosition = 1L,
  73.     eventidSpinPositive = 1L,
  74.     //}}AFX_DISP_ID
  75.     };
  76.  
  77.     virtual void SpinNeedlePosition();
  78.  
  79. protected:
  80.     short   m_needlePosition;
  81. };
  82.